<include file="public@header"/>

</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('Teacher/index')}">所有老师</a></li>
        <li><a href="{:url('Teacher/add')}">添加老师</a></li>
    </ul>
        <form class="well form-inline margin-top-20" method="get"  action="{:url('Teacher/index')}">
            老师名称：
            <input type="text" class="form-control" value="{$Request.param.teacher_name}" name="teacher_name" style="width: 150px;"  placeholder="请输入老师名称">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('Teacher/index')}">清空</a>
        </form>
    <form  method="post" class="margin-top-20" action="{:url('Teacher/delAll')}">
        <button class="btn btn-danger btn-sm js-ajax-submit" type="submit" data-subcheck="true" onclick="return confirm('确定删除吗')" >批量删除</button>
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>
                    <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                </th>
                <th>ID</th>
                <th>老师姓名</th>
                <th>{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="data" item="vo">
                <tr>
                    <td>
                    <input type="checkbox" class="js-check" data-xid="js-check-x" name="ids[]" value="{$vo.id}" >
                    </td>
                    <td>{$vo.id}</td>
                    <td>{$vo.teacher_name}</td>
                    <td>
                        <a class="btn btn-xs btn-primary" href="{:url('teacher/add')}">添加</a>
                        <a class="btn btn-xs btn-success"  href="{:url('teacher/edit')}?id={$vo.id}">{:lang('EDIT')}</a>
                        <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('teacher/delete')}?id={$vo.id}">{:lang('DELETE')}</a>
                    </td>
                </tr>
            </foreach>
            </tbody>

        </table>
        <div class="pagination" style = "margin-left:500px">
            <div class="pagination" >
                {$page}
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>


</script>
</body>
</html>